# -*- encoding: utf-8 -*-
"""
File Name: create_zabbix_monitor_items
Description:
Author: 'lirui'
date: 6/24/2025
Contact: marjey_lee@163.com
Change Activity:
Date: 6/24/2025:
"""

import asyncio

import ll
from modules.zabbix_utils.utils.zabbix_client_manager import ZabbixManager
from projects.monitoring.internet_zabbix_monitoring.config.config import INTERNET_ZABBIX_INFO

_ZABBIX_CLIENT = ZabbixManager(
    ip=INTERNET_ZABBIX_INFO.get('ip'),
    port=INTERNET_ZABBIX_INFO.get('port'),
    username=INTERNET_ZABBIX_INFO.get('username'),
    password=INTERNET_ZABBIX_INFO.get('password'),
    new_url=True
)


async def _main():
    config = ll.join_relative_path(r'projects/generation/create_internet_line_icmp_monitor/zbx_export_hosts.json')
    config = ll.file_to_json_obj(config)
    _ZABBIX_CLIENT.import_config(config)


if __name__ == '__main__':
    asyncio.run(_main())
